#include "Utils.h"
#include "ListNode.h"
#include "TreeNode.h"
#include <iostream>
#include <vector>
#include <string>

using namespace std;

class Issue237 {
public:
	void deleteNode(ListNode* node){
		ListNode* prev=NULL;
		ListNode* ptr=node;
		while (ptr->next!=NULL)
		{
			ptr->val=ptr->next->val;
			prev=ptr;
			ptr=ptr->next;
		}
		prev->next=NULL;
	}
};

int main237(){
	Issue237 sol;
	ListNode* head= createLinkedList();
	printLinkedList(head);
	ListNode* node=head->next;
	sol.deleteNode(node);
	printLinkedList(head);
	return 0;
}